try:
	myfile = open('error', 'r+')
except Exception, e:
	print e
	print 'there is no file named as error'
	response = raw_input('do you want to create a new file')
	if response == 'y':
		myfile = open('error', 'w')
	else:
		pass
else:
	myfile.write('I am here')
	myfile.close()
